<?php

class module_u_user extends a_base_module
implements i_hook_pre_controller,
           i_hook_post_controller,
           i_hook_post_controller_constructor,
           i_hook_post_system,
           i_hook_base_controller_constructor{

    const EVENT_LOGIN_SUCCESS = 'login_success';

    public function __construct($basic_info){
        parent::__construct($basic_info);
    }

    public function exe_pre_controller(){
        Module_Extended::load_helper("user_helper", "user");

    }

    public function exe_post_controller(){
       // trace();
    }

    public function exe_post_controller_constructor(){
       // trace();
        $u = get_logged_user ();
        if($u){
            get_instance()->smarty_wrapper->assign("user",$u);
        }else{
            get_instance()->smarty_wrapper->assign("user",null);
        }
    }

    public function exe_post_system(){
       // trace();
    }

    public function exe_base_controller_constructor(){

    }

//    public static function exe_pre_system(){
//        echo "ok";
//    }

}
?>